package com.itheima.demo;

public class Method3 {
    public static void main(String[] args) {
        print(100,20);
    }
    public static void print(int n, int m) {
        if (n < m) {
            System.out.println(10 + "到" + 20 + "之间的奇数为");
            for (int i = n; i < m; i++) {
                if (i%2==1){
                    System.out.println(i);
                }
            }
        }else {
            System.out.println("输入有误");
        }
    }
}
